package com.leadingsoft.pwxk.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.leadingsoft.pwxk.service.MappingOrgService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = { "mappingOrg" })
@RequestMapping("/w/mappingOrgs")
@RestController
public class MappingOrgController {
	
	@Autowired
	private MappingOrgService service;
	
	@ApiOperation("4A映射组织机构查询")
	@GetMapping
	public List<JSONObject> listByParentId(@RequestParam(value = "node", required = true) Long node) {
		return service.listByParentId(node);
	}
	
/*	@ApiOperation("4A映射组织机构查询第一个机构")
	@GetMapping
	public JSONObject getFirst() {
		return service.getFirst();
	}*/
}
